{include file="public/header" /}

<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.inquiry_title}</h3>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

    <form method="get" name="formSearch" id="formSearch">
        <!--搜索商品-->
        <div class="ds-search-form">
            <dl>
                <dt>商品名称：</dt>
                <dd><input type="text" value="{$Request.get.search_goods_name|default=''}" name="search_goods_name" id="search_goods_name" class="txt"></dd>
            </dl>
            <dl>
                <dt>商品分类</dt>
                <dd id="searchgc_td"></dd>
                <input type="hidden" id="choose_gcid" name="choose_gcid" value="0"/>
            </dl>
            <div class="btn_group">
                <a href="javascript:void(0);" id="dssubmit" class="btn" title="{$Think.lang.ds_query}">{$Think.lang.ds_query}</a>
                <a href="{:url('Goodinquiry/inquiry_info_add',['type'=>$Request.param.type])}" class="btn btn-default" title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
            </div>
        </div>
    </form>

    <table class="ds-default-table">
        <thead>
            <tr class="thead">
                <th class="w60 align-center">平台货号</th>
                <th class="w60 align-center">商品图片</th>
                <th >商品名称</th>
                <th>品牌&分类</th>
                <th class="w200 align-center" >{$Think.lang.ds_handle}</th>
            </tr>
        </thead>
        <tbody>
        {notempty name="goods_list"}
        {foreach name="goods_list" item="v"}
        <tr class="hover edit" id="ds_row_{$v.goods_commonid}">
            <td class="align-center">{$v.goods_commonid}</td>

            <td class="w60 picture" style="width: 60px;">
                <div class="size-56x56">
                    <span class="thumb size-56x56"><i></i>
                        <img src="{:goods_thumb($v, 240)}" onload="javascript:ResizeImage(this,56,56);"/>
                    </span>
                </div>
            </td>

            <td>
                <dl class="goods-info">
                    <dt class="goods-name">{$v.goods_name}</dt>
                </dl>
            </td>

            <td>
                <p>{$v.gc_name}</p>
                <p class="goods-brand">{$Think.lang.ds_brand}：{$v.brand_name}</p>
            </td>

            <td class="align-center">
                <a href="javascript:dsLayerOpen('{:url('Goodinquiry/show_param',['goods_id'=>$v.goods_commonid])}','{$Think.lang.show_param}', '500px', '400px')"
                   class="dsui-btn-edit">
                    <i class="iconfont"></i>导入商品
                </a>
            </td>

        </tr>
        <tr style="display:none;">
            <td colspan="20"><div class="dssc-goods-sku ps-container"></div></td>
        </tr>
        {/foreach}
        {else /}
        <tr class="no_data">
            <td colspan="15">{$Think.lang.ds_no_record}</td>
        </tr>
        {/notempty}
        </tbody>
    </table>
    {$show_page}
</div>

<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
<script src="{$Think.ADMIN_SITE_ROOT}/js/jquery.goods_class.js"></script>
<script type="text/javascript" src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js" charset="utf-8"></script>

<script>
    $(function (){
        init_gcselect({$gc_choose_json},{$gc_json});
        $('#dssubmit').click(function(){
            $('#formSearch').submit();
        });
    });
</script>